'\" te
.\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH OFFSETOF 3C "Dec 29, 1996"
.SH NAME
offsetof \- offset of structure member
.SH SYNOPSIS
.LP
.nf
#include <stddef.h>

\fBsize_t\fR \fBoffsetof\fR(\fB\fR\fItype\fR, \fB\fR\fImember-designator\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBoffsetof()\fR macro defined in <\fBstddef.h\fR> expands to an integral
constant expression that has type \fBsize_t\fR. The value of this expression is
the offset in bytes to the structure member (designated by
\fImember-designator\fR) from the beginning of its structure (designated by
\fItype\fR).
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR attributes (7)
